<?php
require_once '../config.php';
session_start();
session_cache_limiter("private");
if($_SESSION['level']==ADMINISTRATOR||$_SESSION['level']==TEACHER){
	$key_year=$_POST['key_year'];
	if(isset($_POST['key_teacher'])){
		$key_teacher=$_POST['key_teacher'];
	}
	$key_sort=$_POST['key_sort'];
	if(isset($key_teacher)){
		$_SESSION['key_year']=$key_year;
		$_SESSION['key_teacher']=$key_teacher;
		$_SESSION['key_sort']=$key_sort;
		header("LOCATION:../list_thesis.php");
	}else{
		$_SESSION['key_year']=$key_year;
		$_SESSION['key_sort']=$key_sort;
		header("LOCATION:../list_thesis.php");
	}
}else{
	header("LOCATION:../error.php?errcode=2");
}
?>
